package com.jmhy.sdk.view;

import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;

import com.jmhy.sdk.config.AppConfig;

/**
 * @author #Suyghur.
 * Created on 2021/05/06
 */
public class VerifyCodeEditText extends LinearLayout {

    private EditText etInput;
    private Button btnSend;

    public VerifyCodeEditText(Context context) {
        this(context, null);
    }

    public VerifyCodeEditText(Context context, @Nullable AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public VerifyCodeEditText(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initView(context);
    }

    private void initView(Context context) {
        LayoutInflater.from(context).inflate(AppConfig.resourceId(context, "jm_verify_code_edittext", "layout"), this);
        etInput = findViewById(AppConfig.resourceId(context, "et_input_verify_code", "id"));
        btnSend = findViewById(AppConfig.resourceId(context, "btn_send", "id"));
    }

    public EditText getEditText() {
        return this.etInput;
    }

    public Button getButton() {
        return this.btnSend;
    }
}
